<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" href="js/layui-v2.2.5/css/layui.css">
		<script src="js/jquery.js"></script>
		<script type="text/javascript" src="js/layui-v2.2.5/layui.all.js"></script>
		<!-- [if lt IE 8|9 ]-->
		<script type="text/javascript" src="js/layui-v2.2.5/html5.min.js"></script>
		<script type="text/javascript" src="js/layui-v2.2.5/respond.min.js"></script>
	</head>
	<body>
		<div class="layui-fluid" style="padding-top: 10px;background-color: #fff;">
        <div class="layui-row">
            <div class="layui-col-md4">
                <fieldset class="layui-elem-field" style="max-width: 540px;overflow: auto;min-height: 758px;max-height: 758px;">
                    <legend>系统</legend>
                    <div class="layui-field-box">
                        <div>
                            <input class="layui-input" type="text" name="title" autocomplete="off"
                                   id="searchNameId" style="display: inline-block; width: 80%" onkeydown="search(event)">
                            <a class="layui-btn layui-btn-sm layui-btn-primary" href="#" onclick="doSearchTree()" style="height: 36px;line-height: 36px"><i class="fa fa-search" style="padding-top: 9px"></i></a>
                        </div>
                        <div style="position: relative;padding-top: 10px;">
                            <div class="ztree" id="xtwdTree" style="max-width: 540px;"></div>
                            <div class="ztree" id="xtwdSearchTree" style="display: none;" style="max-width: 540px;"></div>
                            <div class="layui-btn-group" style="position: absolute;top: 10px;right: 0">
                                <button class="layui-btn layui-btn-sm" onclick="toAddMl()">添加</button>
                                <button class="layui-btn layui-btn-sm layui-btn-primary" onclick="deleteMl()">删除</button>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="layui-col-md8" id="">
                <fieldset class="layui-elem-field">
                    <legend>目录信息</legend>
                    <div class="layui-field-box">
                        <form class="layui-form" id="mlInfoForm">
                            <input type="hidden" id="id" name="id">
                            <input type="hidden" id="pId" name="pId">
                            <div class="layui-form-item">
                                <div class="layui-row">
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label" for="mlmc">目录名称:</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" name="mlmc" autocomplete="off" id="mlmc" lay-verify="required">
                                        </div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label" for="pmlmc">上级目录:</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" name="pmlmc" autocomplete="off" id="pmlmc" disabled>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-row">
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label" for="mlbm">目录编码:</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" name="mlbm" autocomplete="off" id="mlbm" lay-verify="required">
                                        </div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label" for="mllx">目录类型:</label>
                                        <div class="layui-input-block">
                                            <select id="mllx" name="mllx" lay-verify="required">
                                                <option value="xt">系统</option>
                                                <option value="mk">模块</option>
                                                <option value="gn">功能</option>c
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-row">
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label" for="yxj">优先级:</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="text" name="yxj" autocomplete="off" id="yxj" lay-verify="required">
                                        </div>
                                    </div>
                                    <div class="layui-col-md6">
                                        <label class="layui-form-label" for="sfqy">是否启用:</label>
                                        <div class="layui-input-block">
                                            <input class="layui-input" type="checkbox" name="sfqy" autocomplete="off" id="sfqy" lay-filter="sfqy" lay-skin="switch" lay-text="启用|停用">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item" style="float: right">
                                <div class="layui-input-block">
                                    <button class="layui-btn layui-btn-sm" lay-submit lay-filter="saveMl">保存</button>
                                    <button class="layui-btn layui-btn-sm layui-btn-primary" type="reset" onclick="resetData()">重置</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </fieldset>
                <fieldset class="layui-elem-field" style="min-height: 240px;">
                    <legend>要素内容信息</legend>
                    <div class="layui-field-box">
                        <div class="layui-tab" id="ysTabs" lay-filter="ysTabs">
                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
	
	
	<script>
	//Demo
	layui.use('form', function(){
	  var form = layui.form;
	  
	  // $.pushDataToForm({sfqy: 'Y'}, $('#mlInfoForm'));
	</script>
	</body>
</html>
